
<!-- 顶部搜索 -->
<div class="top-search">
	<input type="text" id="searchtext">
	<div class="mui-icon mui-icon-search searchiconclass"
		onclick="search()"></div>
</div>
<!-- 顶部搜索-->

<!-- 顶部菜单 -->
<div id="header">
	<div class="swiper-wrapper nav-menu">
		<a href="<%=basePath%>mobile/home"><div
				class="swiper-slide active">首页</div></a>
		<c:forEach items="${sessionScope.mall_types}" var="type">
			<c:if test="${type.cBelong==1}">
				<a href="<%=basePath%>mobile/typeDetail?typeId=${type.cCode}">
					<div class="swiper-slide">${type.cName}</div>
				</a>
			</c:if>
		</c:forEach>
	</div>
</div>
<!-- /顶部菜单 -->

<script type="text/javascript">
	window.onload = function() {
		var mySwiper = new Swiper('#header', {
			freeMode : true,
			slidesPerView : 'auto',
		});

		$(".nav-menu div").on('touchstart mousedown', function(e) {
			e.preventDefault()
			$(".nav-menu .swiper-slide").removeClass('active')
			$(this).addClass('active')
			//跳转
			var href = $(this).parent("a").attr("href");
			window.location.href = href;
		});

	}
</script>